package com.rickpan.dto.contacts;

import jakarta.validation.constraints.NotNull;

/**
 * 更新隐私设置请求DTO
 */
public class UpdatePrivacySettingsRequest {

    @NotNull(message = "允许通过用户名搜索设置不能为空")
    private Boolean allowSearchByUsername;

    @NotNull(message = "允许通过邮箱搜索设置不能为空")
    private Boolean allowSearchByEmail;

    @NotNull(message = "允许通过真实姓名搜索设置不能为空")
    private Boolean allowSearchByRealName;

    @NotNull(message = "显示在线状态设置不能为空")
    private Boolean showOnlineStatus;

    @NotNull(message = "允许好友申请设置不能为空")
    private Boolean allowFriendRequests;

    @NotNull(message = "自动接受团队成员设置不能为空")
    private Boolean autoAcceptTeamMembers;

    // 构造函数
    public UpdatePrivacySettingsRequest() {}

    public UpdatePrivacySettingsRequest(Boolean allowSearchByUsername, 
                                       Boolean allowSearchByEmail, 
                                       Boolean allowSearchByRealName, 
                                       Boolean showOnlineStatus, 
                                       Boolean allowFriendRequests, 
                                       Boolean autoAcceptTeamMembers) {
        this.allowSearchByUsername = allowSearchByUsername;
        this.allowSearchByEmail = allowSearchByEmail;
        this.allowSearchByRealName = allowSearchByRealName;
        this.showOnlineStatus = showOnlineStatus;
        this.allowFriendRequests = allowFriendRequests;
        this.autoAcceptTeamMembers = autoAcceptTeamMembers;
    }

    // Getter和Setter方法
    public Boolean getAllowSearchByUsername() {
        return allowSearchByUsername;
    }

    public void setAllowSearchByUsername(Boolean allowSearchByUsername) {
        this.allowSearchByUsername = allowSearchByUsername;
    }

    public Boolean getAllowSearchByEmail() {
        return allowSearchByEmail;
    }

    public void setAllowSearchByEmail(Boolean allowSearchByEmail) {
        this.allowSearchByEmail = allowSearchByEmail;
    }

    public Boolean getAllowSearchByRealName() {
        return allowSearchByRealName;
    }

    public void setAllowSearchByRealName(Boolean allowSearchByRealName) {
        this.allowSearchByRealName = allowSearchByRealName;
    }

    public Boolean getShowOnlineStatus() {
        return showOnlineStatus;
    }

    public void setShowOnlineStatus(Boolean showOnlineStatus) {
        this.showOnlineStatus = showOnlineStatus;
    }

    public Boolean getAllowFriendRequests() {
        return allowFriendRequests;
    }

    public void setAllowFriendRequests(Boolean allowFriendRequests) {
        this.allowFriendRequests = allowFriendRequests;
    }

    public Boolean getAutoAcceptTeamMembers() {
        return autoAcceptTeamMembers;
    }

    public void setAutoAcceptTeamMembers(Boolean autoAcceptTeamMembers) {
        this.autoAcceptTeamMembers = autoAcceptTeamMembers;
    }

    @Override
    public String toString() {
        return "UpdatePrivacySettingsRequest{" +
                "allowSearchByUsername=" + allowSearchByUsername +
                ", allowSearchByEmail=" + allowSearchByEmail +
                ", allowSearchByRealName=" + allowSearchByRealName +
                ", showOnlineStatus=" + showOnlineStatus +
                ", allowFriendRequests=" + allowFriendRequests +
                ", autoAcceptTeamMembers=" + autoAcceptTeamMembers +
                '}';
    }
}
